package com.dhl.factory.simplefactory.traffic;

import com.dhl.factory.simplefactory.traffic.Traffic;

/**
 * @author YHS
 */
public class Car implements Traffic {
    /**
     * 交通工具名称
     */
    private String name;

    public Car(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        System.out.println(name + "：跑起来了");
    }

    @Override
    public void stop() {
        System.out.println(name + "：停止下来了");
    }
}
